//#define __DEBUG__
// by Xeno
#define THIS_FILE "fn_dirtopos.sqf"
#include "x_setup.sqf"

private ["_deg","_pos1","_pos2"];
PARAMS_2(_pos1,_pos2);
_deg = ((_pos2 select 0) - (_pos1 select 0)) atan2 ((_pos2 select 1) - (_pos1 select 1));
if (_deg < 0) then {_deg = _deg + 360};
_deg